package com.example.makerspace.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.makerspace.domain.EntRelationsDO;
import com.example.makerspace.mapper.EntRelationsMapper;
import org.springframework.stereotype.Component;


import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;

@Component
public class EntRelationsDAO extends  BaseDAO<EntRelationsDO> {
    @Resource
    private EntRelationsMapper entRelationsMapper;



    @PostConstruct
    public void init(){
        this.mapper = entRelationsMapper;
    }

    public List<EntRelationsDO> selectByName(String name) {
        QueryWrapper<EntRelationsDO> wrapper = new QueryWrapper<>();
        wrapper.eq("ent_name",name);
       return  mapper.selectList(wrapper);
    }
}
